package BasicClass.One;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 思路：
 * 将数组中所有数字异或运算之后，得到的结果为奇数次的数a^b^b=a
 */
public class BasicOne13 {
    public static void main(String[] args) throws IOException {
        BasicOne13 one14 = new BasicOne13();
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int size = Integer.parseInt(bufferedReader.readLine());
        String[] split = bufferedReader.readLine().split(" ");
        int[] nums = new int[size];
        for (int i = 0; i < split.length; i++) {
            nums[i] = Integer.parseInt(split[i]);
        }
        one14.Main(nums);
    }

    /**
     * 一个数组中有一种数出现了奇数次，其他数都出现了偶数次，怎么找到这一个数？
     */
    public void Main(int[] nums) throws IOException {
        int eor = 0;
        for (int i = 0; i < nums.length; i++) {
            eor ^= nums[i];
        }
        System.out.println(eor);
    }
}
